import 'package:flutter/material.dart';
import 'package:tihai/page/community/community_page.dart';
import 'package:tihai/page/community/type_home_page.dart';
import 'package:tihai/page/community/type_page.dart';
import 'package:tihai/page/game/game_page.dart';
import 'package:tihai/page/home/home_page.dart';
import 'package:tihai/page/init/login_page.dart';
import 'package:tihai/page/setting/setting_page.dart';

import 'page/home/problem_page.dart';
import 'page/init/scaffold_page.dart';

void main() => {runApp(const MyApp())};

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: const MyScaffold(),
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      routes: {
        '/home':(context)=>const HomePage(),
        '/community':(context)=>const CommunityPage(),
        '/game':(context)=>const GamePage(),
        '/setting':(context)=>const SettingPage(),
        '/problem':(context)=>const ProblemPage(),
        '/login':(context)=>const LoginPage(title: "登录"),
        '/typeHome':(context)=>const TypeHomePage(),
        '/type':(context)=>const TypePage(),
      },
      initialRoute: '/login',
    );
  }
}



